# -*- coding: utf-8 -*-
import re

if __name__ == "__main__":
    result = []
    aa = re.compile("(?P<cw>\W+)(?P<aw>\w+)")
    f1 = open("aa.txt")

    for lno , line in enumerate(f1):
        m = aa.search(line)
        w = "%s    %s" %(m.group(2),m.group(1))
        if lno < 2:
            print line
            print m.group(1)
        result.append( w )

    f1.close()

    f = open("result.txt","w")
    f.write("\n".join(result))
    f.flush()
    f.close()

    print "finish"
        
            

